package 创建线程的四种方式;

import java.util.concurrent.FutureTask;

/**
 * @Author forsake
 * @Description Futuretask 实现了 Runnable，直接向new Thread()里面丢就可以创建线程
 * @Date 21:49 2022/12/8
 **/  
public class Callable1<S> {
    public static void main(String[] args) {
        new Thread(() -> {
            System.out.println("22222222222");
            Thread.interrupted();
            System.out.println("1111111111");
        }).start();
        new Thread(new FutureTask<String>(() -> {
            System.out.println("222");
            return "ds";
        })).start();
    }
}
